<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;

class Income extends Model
{
    use SoftDeletes;

    protected $table = 'income';
    public $fillable = [
        'admin_user_id', 'fee', 'order_no'
    ];


    public function allot()
    {
        return $this->belongsTo(Allot::class, 'id', 'admin_user_id');
    }

    //查询订单信息
    public function order()
    {
        return $this->belongsTo(Order::class, 'order_id', 'id');
    }

    //查询用户信息
    public function user()
    {
        return $this->belongsTo(User::class, 'admin_user_id', 'id');
    }


}
